package chapter4.comJDBC;

import java.util.List;
import java.util.Map;

import chapter4.comJDBC.UserDao;
import chapter4.comJDBC.User;

public class UserService {
	private UserDao userDao;

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
	public void executeTest() {
	   userDao.executeTest();
    }
	public void updateInsert(User user) {
		userDao.updateInsert(user);
	}
	public void updateEdit(String id) {
		userDao.updateEdit(id);
	}
	
	public void updateDel() {
		userDao.updateDel();
	}
	
	public String findNameById(int id) {
		return userDao.findNameById(id);
	}

	public int findNumbers() {
		return userDao.findNumbers();
	}
	public List<Map<String, Object>> findAllMap() {
		return userDao.findAllMap();
	}
	public List<Map<String, Object>> getList(String name) {
		return userDao.getList(name);
	}
//	public List<User> findAll() {
//		return userDao.findAll();
//	}
//
//	public User findById(int id) {
//		return userDao.findById(id);
//	}

	public Map<String, Object> findMapById(int id) {
		return userDao.findMapById(id);
	}


}
